import { ref, computed, watch } from 'vue'
import { defineStore } from 'pinia'

// 配置数据
export const useFakeDownload = defineStore('fakeDownload', () => {
  const showDialog = ref(false);//是否显示弹出框
  const closeDialogTime = ref(0);//上一次关闭弹出框的时间

  function setShowDialog(show:boolean) {//设置默认路径
    if (show) {
      showDialog.value = true;
    } else {
      showDialog.value = false;
      closeDialogTime.value = (new Date()).getTime();
    }
  }


  return { showDialog, closeDialogTime,setShowDialog }
})
